#include <STC15F2K60S2.H>
#include "smg.h"
#include "DS18B20.h"
#include "OneWire.h"

unsigned char ack;
float Temp;

void main()
{
	All_Init();	
	ack = OneWire_Init();
	
	DS18B20_ConvertT();	//先转换1次，
	Delay_ms(1000);		//再延时1s，就不会显示默认温度25了
	
	while(1)
	{
		DS18B20_ConvertT();
		Temp =  DS18B20_ReadT();	//float类型
		
		SMG_ShowFloatNum(Temp);
	}
}
